﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Media;


namespace Like
{
    public partial class Form1 : Form
    {
        bool isclic = false;
        public Form1()
        {
            InitializeComponent();
            pictureBox1.Image = Properties.Resources.timg;
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {

        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void button2_MouseEnter(object sender, EventArgs e)
        {
            button2.Text = "喜欢";
            button1.Text = "不喜欢";
        }

        private void button2_MouseLeave(object sender, EventArgs e)
        {
            button2.Text = "不喜欢";
            button1.Text = "喜欢";
        }

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            if ( !isclic)
            {
                MessageBox.Show("想啥呢？老老实实的回答问题，不然分分钟变病毒信不信！");
                e.Cancel = true;
            }
            else
            {
                MessageBox.Show("这位同志还是很诚实的嘛，再见了！");
            }
            
        }

        private void button1_Click(object sender, EventArgs e)
        {
            pictureBox1.Image = Properties.Resources.qingzhu;
            SoundPlayer player = new SoundPlayer(Properties.Resources._222);
            player.Play();
            isclic = true;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            pictureBox1.Image = Properties.Resources.qingzhu;
            SoundPlayer player = new SoundPlayer(Properties.Resources._222);
            player.Play();
            isclic = true;
        }
    }
}
